package org.xyxy.scientificResearch.service;

import java.util.Date;

import org.hpin.common.core.orm.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.xyxy.scientificResearch.dao.NoticeDao;
import org.xyxy.scientificResearch.entity.Notice;
@Service(value = "org.xyxy.scientificResearch.service.NoticeService")
@Transactional()
public class NoticeService extends BaseService{
	@Autowired
	private NoticeDao dao;
	public void deleteNotice(String[] id, String accountName, Date deleteTime) {
		for(int  i = 0 ; i<id.length ; i++){
			Notice notice = (Notice) dao.findById(Notice.class, id[i]);
			notice.setIsDeleted(1);
			notice.setDeleteUserId(accountName);
			notice.setDeleteTime(deleteTime);
			dao.update(notice);
		}
	}
}
